package leetcode.code0621;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution621 implements IDebug {

	public abstract int leastInterval(char[] tasks, int n);

	@Override
	public void debug1() {
		String[] strs = HelpDebug.str2array2("[\"A\",\"A\",\"A\",\"A\",\"A\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\"]");
		char[] tasks = new char[strs.length];
		int p = 0;
		for (String s : strs) {
			tasks[p++] = s.charAt(0);
		}
		int r = this.leastInterval(tasks, 2);
		int e = 16;
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		String[] strs = HelpDebug.str2array2("[\"A\",\"A\",\"A\",\"B\",\"B\",\"B\"]");
		char[] tasks = new char[strs.length];
		int p = 0;
		for (String s : strs) {
			tasks[p++] = s.charAt(0);
		}
		int r = this.leastInterval(tasks, 2);
		int e = 8;
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
